﻿using Savorboard.CAP.InMemoryMessageQueue;

namespace WebAPI.Configure;

public static class CAPExtensions
{
    public static void AddBuildinCAP(this IServiceCollection services)
    {
        services.AddCap(x =>
        {
            x.UseInMemoryStorage();
            x.UseInMemoryMessageQueue();
            x.UseDashboard(option =>
            {
                option.AllowAnonymousExplicit = false;
                option.AuthorizationPolicy = "ApiPerm";
            });
        });

    }

}

